package com.cqgc.service.impl;
import com.cqgc.dao.HarvestDao;
import com.cqgc.domain.Harvest;
import com.cqgc.domain.PageHelper;
import com.cqgc.service.HarvestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HarvestServiceImpl implements HarvestService {
    @Autowired
    private HarvestDao dao;

    @Override
    public List<Harvest> findAll(PageHelper pageHelper) {
        return dao.findAll(pageHelper);
    }

    @Override
    public List<Harvest> findAllHarvest() {
        return dao.findAllHarvest();
    }

    @Override
    public Harvest findHarvestByHid(int hid) {
        return dao.findHarvestByHid(hid);
    }

    @Override
    public int editHarvest(Harvest harvest) {
        return dao.editHarvest(harvest);
    }

    @Override
    public int addHarvest(Harvest harvest) {
        return dao.addHarvest(harvest);
    }

    @Override
    public int deleteHarvest(Harvest harvest) {
        return dao.deleteHarvest(harvest);
    }

    @Override
    public int banHarvest(Harvest harvest) {
        return dao.banHarvest(harvest);
    }
}
